'use strict';

const Controller = require('egg').Controller;

class GetUserController extends Controller {
    async all() {
        let userList = await this.service.user.getUsertList()
        this.ctx.body = userList;
    }
    async one() {
        let params = this.ctx.request.body;
        let user = await this.service.user.getUser(params)
        this.ctx.body = user;
    }
    async addOne() {
        let params = this.ctx.request.body;
        let user = await this.service.user.addOneUser(params)
        this.ctx.body = user;
    }
}

module.exports = GetUserController;